// 统一管理项目用户相关的接口
import request, { type ResponseData } from "../request";
import type { LoginRequestData, UserInfo } from "./type";

enum API {
    LOGIN_URL = "/admin/acl/index/login",
    USERINFO_URL = "/admin/acl/index/info",
    LOGOUT_URL = "/admin/acl/index/logout"
}

export const reqLogin = (data: LoginRequestData) => request.post<ResponseData<string>>(API.LOGIN_URL, data)

export const reqLogout = () => request.post<ResponseData<null>>(API.LOGOUT_URL)

export const reqUserInfo = () => request.get<ResponseData<UserInfo>>(API.USERINFO_URL)
